package com.ruoyi.system.service.city.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.city.CityShareMapper;
import com.ruoyi.system.domain.city.CityShare;
import com.ruoyi.system.service.city.ICityShareService;

/**
 * 分享项目Service业务层处理
 * 
 * @author cjq
 * @date 2023-07-30
 */
@Service
public class CityShareServiceImpl implements ICityShareService 
{
    @Autowired
    private CityShareMapper cityShareMapper;

    /**
     * 查询分享项目
     * 
     * @param shareId 分享项目主键
     * @return 分享项目
     */
    @Override
    public CityShare selectCityShareByShareId(Long shareId)
    {
        return cityShareMapper.selectCityShareByShareId(shareId);
    }

    /**
     * 查询分享项目列表
     * 
     * @param cityShare 分享项目
     * @return 分享项目
     */
    @Override
    public List<CityShare> selectCityShareList(CityShare cityShare)
    {
        return cityShareMapper.selectCityShareList(cityShare);
    }

    /**
     * 新增分享项目
     * 
     * @param cityShare 分享项目
     * @return 结果
     */
    @Override
    public int insertCityShare(CityShare cityShare)
    {
        cityShare.setCreateTime(DateUtils.getNowDate());
        return cityShareMapper.insertCityShare(cityShare);
    }

    /**
     * 修改分享项目
     * 
     * @param cityShare 分享项目
     * @return 结果
     */
    @Override
    public int updateCityShare(CityShare cityShare)
    {
        return cityShareMapper.updateCityShare(cityShare);
    }

    /**
     * 批量删除分享项目
     * 
     * @param shareIds 需要删除的分享项目主键
     * @return 结果
     */
    @Override
    public int deleteCityShareByShareIds(Long[] shareIds)
    {
        return cityShareMapper.deleteCityShareByShareIds(shareIds);
    }

    /**
     * 删除分享项目信息
     * 
     * @param shareId 分享项目主键
     * @return 结果
     */
    @Override
    public int deleteCityShareByShareId(Long shareId)
    {
        return cityShareMapper.deleteCityShareByShareId(shareId);
    }
}
